package com.zl.ble;

import android.os.Environment;

import java.io.File;

public class BLEConstants {
    public static final String TAG = "Bluetooth";

    public static final String BASE_PATH = Environment.getExternalStorageDirectory().getAbsolutePath();

    public static final String CACHE_DATA_PATH = BASE_PATH + File.separator + "BLE" + File.separator + "cache";

    public static final String SERVICE_NAME = "BLUETOOTH_SERVICE";
    public static final String SPP_UUID = "00001101-0000-1000-8000-00805F9B34FB";
//    public static final String SPP_UUID="8ce255c0-200a-11e0-ac64-0800200c9a66";

    public static final int CHECK_ACTIVE_COOL_TIME = 5 * 1000;
    public static final int CHECK_ACTIVE_FAIL_NUM = 3;
    public static final int MESSAGE_EXP_TIME = 10 * 1000;


    public static final int STATE_NONE = 0;       // we're doing nothing
    public static final int STATE_LISTEN = 1;     // now listening for incoming connections
    public static final int STATE_CONNECTING = 2; // now initiating an outgoing connection
    public static final int STATE_CONNECTED = 3;  // now connected to a remote device


    public static final int MESSAGE_TYPE_INIT = 10;//init
    public static final int MESSAGE_TYPE_KEEP = 11;//keep activite
    public static final int MESSAGE_TYPE_BODY = 12;//body

    public static final int MESSAGE_ACTION_REQUEST = 20;//request
    public static final int MESSAGE_ACTION_RESPONSE = 21;//response
}
